package com.huawei.appgallery.forum.user.api;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnDismissListener;
import com.huawei.appgallery.assistantdock.base.externalaction.openviewaction.IOpenViewAction;
import com.huawei.appgallery.foundation.ui.framework.widget.dialog.dialogactivity.DialogActivity.a;
import com.huawei.secure.android.common.intent.SafeIntent;
import o.cbm;
import o.ckh;
import o.dys;

public class OpenLoginCheckerAction extends IOpenViewAction {
    public static final String ACTION = "openLoginCheckerAction";
    static d openCallBack;

    public interface d {
        void ˏ(AlertDialog alertDialog, a aVar, int i, Context context);

        void ॱ(DialogInterface dialogInterface);
    }

    public OpenLoginCheckerAction(dys.a aVar, SafeIntent safeIntent) {
        super(aVar, safeIntent);
    }

    public void onAction() {
        final cbm o_cbm = new cbm((Context) this.callback);
        o_cbm.ˏ(new ckh.a(this) {
            final /* synthetic */ OpenLoginCheckerAction ॱ;

            public void ˏ(AlertDialog alertDialog, a aVar, int i) {
                OpenLoginCheckerAction.openCallBack.ˏ(alertDialog, aVar, i, (Context) this.ॱ.callback);
                o_cbm.ॱ();
            }
        });
        o_cbm.ˊ(new OnDismissListener(this) {
            final /* synthetic */ OpenLoginCheckerAction ˋ;

            {
                this.ˋ = r1;
            }

            public void onDismiss(DialogInterface dialogInterface) {
                OpenLoginCheckerAction.openCallBack.ॱ(dialogInterface);
                ((Activity) this.ˋ.callback).finish();
            }
        });
        o_cbm.ˏ();
    }

    public static void setOpenCallBack(d dVar) {
        openCallBack = dVar;
    }
}
